package com.suli.multimedia.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.suli.multimedia.enums.ImageType;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author SuLi
 * @since 2022-03-23
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName("image")
public class Image implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图片id
     */
    @TableId(value = "image_id", type = IdType.ASSIGN_ID)
    private String imageId;

    /**
     * 图片名称
     */
    @TableField("image_name")
    private String imageName;

    /**
     * 图片类型
     */
    @TableField("image_type")
    private ImageType imageType;

    /**
     * 图片地址
     */
    @TableField("image_url")
    private String imageUrl;

    /**
     * 景点id
     */
    @TableField("scenic_id")
    private Integer scenicId;

    public Image(String imageName, ImageType imageType, Integer scenicId) {
        this.imageName = imageName;
        this.imageType = imageType;
        this.scenicId = scenicId;
    }

    /**
     * 逻辑删除
     */
    @TableField(value = "is_deleted",fill = FieldFill.INSERT)
    @TableLogic
    private Integer isDeleted;
}
